Skip to content

Federation: Notify Remote Users of Being Added to a New Conversation#1594

Merged
mdimjasevic merged 19 commits intodevelopfrom
mdimjasevic/fed-inform-remote-be-conv
Jun 21, 2021
Merged

Federation: Notify Remote Users of Being Added to a New Conversation#1594
mdimjasevic merged 19 commits intodevelopfrom
mdimjasevic/fed-inform-remote-be-conv

Conversation

@mdimjasevic
Copy link
Contributor

@mdimjasevic mdimjasevic commented Jun 11, 2021

This PR introduces:

  • a gRPC call to a remote Galley to update its own view of a conversation on another backend
  • a test that makes sure that the local and remote Galley have the same view of conversation membership

Note 1: This depends on PR #1585.
Note 2: I am not confident in the test's correctness. I based it on @jschaul's similar test.

@mdimjasevic mdimjasevic changed the title Notify remote users of being added to a new conversation Federation: Notify Remote Users of Being Added to a New Conversation Jun 11, 2021
@mdimjasevic mdimjasevic marked this pull request as ready for review June 11, 2021 14:11
@mdimjasevic mdimjasevic force-pushed the mdimjasevic/fed-inform-remote-be-conv branch from e35ef19 to 4bf3c28 Compare June 11, 2021 14:34
Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is behaving correctly in terms of events. See comment below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This utility function is a bit confusing. Could you document what its arguments are? For example, it seems that alice is only used for its domain.

@mdimjasevic mdimjasevic force-pushed the mdimjasevic/fed-inform-remote-be-conv branch from b77da97 to f1eea64 Compare June 18, 2021 15:08
@mdimjasevic mdimjasevic requested a review from pcapriotti June 21, 2021 06:01
Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok, but maybe it would have been slightly nicer to add a Maybe CreateConversation field to the updateConversationMemberships RPC, since they basically do the same thing, and the only difference is the events they send out.

I'm also not sure about the name CreateConversation, which sounds like an action, when it should be a noun. Maybe change it to CreatedConversation?

By the way, what is wrong with simply reusing the Conversation type from wire-api instead of introducing a new one?

Marko Dimjašević added 2 commits June 21, 2021 10:14
- Get rid of a redundant record field
- Rename a data type to better reflect its purpose
-- Rename fields and functions accordingly
@mdimjasevic mdimjasevic merged commit 6f8b08b into develop Jun 21, 2021
@mdimjasevic mdimjasevic deleted the mdimjasevic/fed-inform-remote-be-conv branch June 21, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants